projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f4130b
)
shortcut controller: Fix mnemonic cycling
author
Matthias Clasen
<mclasen@redhat.com>
Thu, 28 May 2020 12:52:55 +0000
(08:52 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Thu, 28 May 2020 12:52:55 +0000
(08:52 -0400)
Iterate the shortcuts we found in order, not in
reverse. Otherwise, we always end up activating
the last_selected one, since it is last in the
list.
This broke in
fb9b54d4b209afc
when a list was
turned into an array.
gtk/gtkshortcutcontroller.c
patch
|
blob
|
history
diff --git
a/gtk/gtkshortcutcontroller.c
b/gtk/gtkshortcutcontroller.c
index 92f244455b7c4348bb7715c608bcd2cd0efec052..81ca7f7b2682f1b07de42b1695e922462784664d 100644
(file)
--- a/
gtk/gtkshortcutcontroller.c
+++ b/
gtk/gtkshortcutcontroller.c
@@
-373,7
+373,8
@@
gtk_shortcut_controller_run_controllers (GtkEventController *controller,
if (!shortcuts)
return retval;
- for (i = shortcuts->len - 1, p = shortcuts->len; i >= 0; i--)
+ p = shortcuts->len;
+ for (i = 0; i < shortcuts->len; i++)
{
const ShortcutData *data = &g_array_index (shortcuts, ShortcutData, i);